<!-- 这个是测试的 -->
<template>
  <div class="container">
    <div class="header">
      <div class="siteName">{{ attr.siteName }}</div>
      <div class="closeBtn" @click="closePop"></div>
    </div>
    <div class="wrapper">
      <div class="img">
        <Carousel autoplay height="30%">
          <Carousel-item v-for="(item, index) in attr.urls" :key="index">
            <div class="items">
              <img :src="item" style="height: 100%;" />
            </div>
          </Carousel-item>
        </Carousel>
        <!-- <img :src="attr.picturePath" style="height: 100%;" /> -->
      </div>
      <div class="content">{{ attr.historyEvolution }}</div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    attr: {
      type: Object,
      require: true
    }
  },
  data () {
    return {
      urlArr: []
    }
  },
  mounted () {},
  onShow () {
    console.log('show')
    this.$nextTick(() => {
      this.getPicturePath(this.attr.picturePath)
    })
  },
  methods: {
    // 处理图片路径
    getPicturePath (param) {
      console.log(param, 'param')
      if (param) {
        this.urlArr = param.split(',')
        console.log(this.urlArr, '111')
      }
    },
    closePop () {
      this.$emit('closePop')
    }
  }
}
</script>
<style lang="scss" scoped>
.container {
  background: #273022;
  color: #fff;
  width: 100%;
  height: 100%;
  .header {
    margin-bottom: 17px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    padding-right: 12px;
    // background-image: linear-gradient(to right, #ee9c14 30%, #273022);
  }
  .header .siteName {
    width: 310px;
    height: 45px;
    font-size: 20px;
    font-size: 20px;
    box-sizing: border-box;
    padding-left: 10px;
    line-height: 30px;
    background: url('../../assets/images/title_bg.png') no-repeat 100% 100%;
  }
  .wrapper {
    // height:calc(100vh - 62px);
    // border:1px solid red;
    overflow-y: scroll;
    height: 80%;
  }
  .img {
    width: 100%;
    height: 30%;
    display: flex;
    justify-content: center;
    align-items: center;

    // border: 1px dashed #aaa;
    img {
      height: 100%;
      // width:100%;
      background-size: contain;
    }

    //   .ivu-carousel-list{
    //   width: 100%;
    //   height:100%
    // }
    // padding: 10%;
    .demo-carousel {
      width: 100%;
      height: 100%;
      background-size: 100% 100%;
    }
  }

  .content {
    width: 100%;
    // height: 55%;
    padding: 5%;
    text-indent: 2em;
    // overflow-y: scroll;
    font-size: 16px;
    color: #fff;
  }
  // 滚动条整体部分
  .wrapper::-webkit-scrollbar {
    width: 6px;
  }
  //滚动条里面的滑块
  .wrapper::-webkit-scrollbar-thumb {
    border-radius: 10px;
    // height:10px;
    // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    // background: #999;
    background: rgba(216, 216, 216, 1);
  }
  //滚动条的轨道
  .wrapper::-webkit-scrollbar-track {
    // box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    // background: #363535;
    background: rgba(216, 216, 216, 0.6);
  }

  // .ivu-carousel-track img {
  //   width: 100%;
  //   height: 11vh;
  // }
}
.img ::v-deep .ivu-carousel {
  width: 100%;
  height: 100%;
}
.img ::v-deep .ivu-carousel-list {
  height: 100%;
  width: 100% !important;
}
.img ::v-deep .ivu-carousel-item {
  width: 100% !important;
  height: 100% !important;
}
.img ::v-deep .ivu-carousel-track {
  width: 100% !important;
  height: 100%;
}
.img ::v-deep .ivu-carousel-dots li button {
  width: 4px !important;
  height: 4px !important;
  border: 50%;
}
.img ::v-deep .ivu-carousel-dots-inside {
  bottom: -17px;
}
.items {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.items img {
  height: 100%;
}
.closeBtn {
  width: 30px;
  height: 30px;
  background: url('../../assets/images/close_btn.png') no-repeat 100% 100%;
  margin-top: -20px;
  // position: absolute;
  // top:3px;
  // right:0;
  z-index: 11;
  cursor: pointer;
}
</style>
